package sensors;

import java.util.Date;

public class TimeSensor implements ISensor{

	long timeStart;
	double[] range = new double[]{0,15,240};
	
	
	public TimeSensor() {
		timeStart = new Date().getTime();
	}
	@Override
	public double getValue() {
		return (int)((-timeStart+new Date().getTime())/60000);
	}

	@Override
	public double[] getRange() {
		return range;
	}

	@Override
	public void setRange(double min, double thresh, double max) {
		this.range = new double[]{min,thresh,max};
	}

	@Override
	public Object[] getData() {
		Object[] datas = new Object[]{"Tempo di guida"};
		return datas;
	}

	@Override
	public int getType() {
		return DATA.AMBIENT_BASED;
	}

	@Override
	public boolean getOnline() {
		return true;
	}
	@Override
	public boolean getASCDESC() {
		return true;
	}

}
